﻿using System.Diagnostics.CodeAnalysis;
using Swimj.CommonLib.Attributes;
using Swimj.CommonLib.Base;

namespace Admin.CommonLib.Models.Permission
{
    public class PermissionTemplateResponseDto : ImportTemplateResponseDto
    {
        [ExcelColumn(DisplayText = "权限编码")]
        [NotNull]
        public string? Code { get; set; }

        [ExcelColumn(DisplayText = "权限名称")]
        [NotNull]
        public string? Name { get; set; }

        [ExcelColumn(DisplayText = "所属权限编码")] public string? ParentCode { get; set; }

        [ExcelColumn(DisplayText = "所属权限名称")] public string? ParentName { get; set; }

        public Guid? ParentId { get; set; }

        [ExcelColumn(DisplayText = "Url")] public string? Uri { get; set; }

        [ExcelColumn(DisplayText = "权限类型")]
        [NotNull]
        public string? PermissionType { get; set; }

        [ExcelColumn(DisplayText = "图标")] public string? Icon { get; set; }

        public string? Description { get; set; }

        public bool IsVisible { get; set; }

        [ExcelColumn(DisplayText = "排序")] public int Sort { get; set; }

        public int Level { get; set; }
    }

    public class PermissionImportResponseDto : PermissionTemplateResponseDto
    {
        public PermissionImportResponseDto(PermissionTemplateResponseDto baseResponseDto)
        {
        }

        public string? ErrorMessage { get; set; }
    }
}